﻿package mortal.game.view.platform.platformTencent
{
    import com.mui.controls.*;
    import fl.data.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.platform.*;

    public class PlatformQQLevelPanel extends PlatformTencentBasePanel
    {
        private var _levelGiftList:GTileList;

        public function PlatformQQLevelPanel()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._levelGiftList = UIFactory.tileList(23, 25, 500, 368, this, "TileListQQYellowStyle");
            this._levelGiftList.columnWidth = 240;
            this._levelGiftList.rowHeight = 120;
            this._levelGiftList.horizontalGap = 4;
            this._levelGiftList.verticalGap = 3;
            this._levelGiftList.setStyle("cellRenderer", platformQQLevelCellRender);
            return;
        }// end function

        override protected function createYellow() : void
        {
            super.createYellow();
            _bg.imgUrl = ImagesConst.QQYeallowVipNewBg3;
            return;
        }// end function

        override protected function createBlue() : void
        {
            super.createBlue();
            _bg.imgUrl = ImagesConst.QQBlueVipNew3;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            if (this._levelGiftList)
            {
                this._levelGiftList.dispose(param1);
                this._levelGiftList = null;
            }
            super.disposeImpl(param1);
            return;
        }// end function

        override public function refresh() : void
        {
            var _loc_1:int = 0;
            var _loc_2:* = new DataProvider();
            _loc_1 = 0;
            while (_loc_1 < PlatformGiftConfig.instance.levelGiftVec.length)
            {
                
                _loc_2.addItem(PlatformGiftConfig.instance.levelGiftVec[_loc_1]);
                _loc_1++;
            }
            this._levelGiftList.dataProvider = _loc_2;
            this._levelGiftList.drawNow();
            return;
        }// end function

    }
}
